export default {
  state: {
    list: JSON.parse(localStorage.getItem('list')) || []
  },
  mutations: {
    addList(state, payload) {
      state.list = [
        ...state.list,
        payload
      ]
    }
  },
  actions: {
  },
  getters: {
    getAll(state) {
      return state.list.every(prod => {
        return prod
      })
    }
  }
}
